<header class="header">
    <a [routerLink]="['']" id="header-logo">
        <img [src]="site.logo" [attr.alt]="site.name" *ngIf="site">
        Duo-Doc <span>v3.0</span>
    </a>

    <div class="right-content">
        <ul class="head-nav">
            <li>
                <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=nos0bd0">
                    <i class="material-icons">feedback</i>
                    钉钉咨询|反馈
                </a>
            </li>
            <li>
                <a [routerLink]="['/doc/com.duoec.doc:doclet-server']" [queryParams]="{'r': '/doc/文档接入'}"><i class="material-icons">help</i>文档接入帮助</a>
            </li>
        </ul>
        <div class="search-form">
            <i class="material-icons search-icon">search</i>
            <input class="form-control no-hide-on-click" name="keyword" [(ngModel)]="keyword" (click)="showSearchResultContent()">
        </div>
        <ul class="head-nav">
            <li *ngIf="!user && site && site.auths">
                <a *ngIf="!site.auths.includes('pwd')" href="/api/oauth2/{{site.auths[0]}}?{{getLoginParams()}}"><i class="material-icons">person</i>用户</a>
                <a *ngIf="site.auths.includes('pwd')" (click)="showLoginForm=true"><i class="material-icons">person</i>登录</a>
            </li>
            <li *ngIf="user">
                <a [routerLink]="['my/info']"><i class="material-icons">person</i>{{user.name}}</a>
            </li>
        </ul>
    </div>
    <div id="search-result-content" #searchResultContenter *ngIf="searchedKeyword" appScrollHold appHideOnClickOutside>
        <h4>{{searchedKeyword?'搜索＂' + searchedKeyword + '＂结果：' : ''}}</h4>
        <div id="search-result">
            <app-left-nav-api-item *ngIf="menuType!=='index'" [menuList]="menus"></app-left-nav-api-item>
            <app-left-nav-doc-item *ngIf="menuType==='index'" [menuList]="menus"></app-left-nav-doc-item>
        </div>
    </div>

    <app-pop-dialog
        [id]="'login-uc-dialog'"
        [dialogDisplay]="showLoginForm"
        [header]="'DUO-DOC | 用户登录'"
        (dialogDisplayChange)="showLoginForm=$event">
        <app-user-login-full [show]="showLoginForm"></app-user-login-full>
    </app-pop-dialog>
</header>
